<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 8.0">
<TITLE></TITLE>
</HEAD>
<BODY>



    <p>
        void printType ( CDBVariant* var ) { if (!var ) { cout &lt;&lt; &quot;NULL Var Parameter&quot; 
        &lt;&lt; endl; return; } switch ( var-&gt;m_dwType ) { case DBVT_NULL: { cout &lt;&lt; &quot;var is 
        NULL&quot; &lt;&lt; endl; break; } case DBVT_BOOL: { bool b = var-&gt;m_boolVal ? true : 
        false; cout &lt;&lt; &quot;var is bool:&quot; &lt;&lt; b &lt;&lt; endl; break; } case DBVT_UCHAR: { unsigned 
        char c = var-&gt;m_chVal; cout &lt;&lt; &quot;var is unsigned char:&quot; &lt;&lt; c &lt;&lt; endl; break; } 
        case DBVT_SHORT: { short sht = var-&gt;m_iVal; cout &lt;&lt; &quot;var is short:&quot; &lt;&lt; sht &lt;&lt; 
        endl; break; } case DBVT_LONG: { long lng = var-&gt;m_lVal; cout &lt;&lt; &quot;var is long&quot; 
        &lt;&lt; endl; break; } case DBVT_SINGLE: { float flt = var-&gt;m_fltVal; cout &lt;&lt; &quot;var is 
        single:&quot; &lt;&lt; flt &lt;&lt; endl; break; } case DBVT_DOUBLE: { double vasr = 
        var-&gt;m_dblVal; cout &lt;&lt; &quot;var is double: &quot; &lt;&lt; vasr &lt;&lt; endl; break; } case 
        DBVT_DATE: { TIMESTAMP_STRUCT * structdata = var-&gt;m_pdate; cout &lt;&lt; &quot;var is a 
        Date&quot; &lt;&lt; endl; break; } case DBVT_BINARY: { CLongBinary* binarydata = 
        var-&gt;m_pbinary; cout &lt;&lt; &quot;var is Binary data&quot; &lt;&lt; endl; break; } case DBVT_STRING: 
        { CString* string = var-&gt;m_pstring; cout &lt;&lt; &quot;var is string &quot; &lt;&lt; 
        string-&gt;GetBuffer() &lt;&lt; endl; break; } case DBVT_ASTRING: { CString* string = 
        var-&gt;m_pstringA; cout &lt;&lt; &quot;var is string &quot; &lt;&lt; string-&gt;GetBuffer() &lt;&lt; endl; break; 
        } case DBVT_WSTRING: { CStringW * wstring = var-&gt;m_pstringW; cout &lt;&lt; &quot;var is 
        WideString&quot; &lt;&lt;endl; break; } default: { cout &lt;&lt; &quot;something went wrong&quot; &lt;&lt; endl; 
        break; } } }
    </p>



</BODY>
</HTML>
